from django.contrib import admin
from .models import Meeting, MeetingTranscript


@admin.register(Meeting)
class MeetingAdmin(admin.ModelAdmin):
    list_display = ['title', 'host', 'meeting_id', 'status', 'scheduled_time', 'created_at']
    list_filter = ['status', 'created_at']
    search_fields = ['title', 'meeting_id', 'host__username']
    readonly_fields = ['meeting_id', 'created_at', 'updated_at']


@admin.register(MeetingTranscript)
class MeetingTranscriptAdmin(admin.ModelAdmin):
    list_display = ['speaker_name', 'meeting', 'start_time', 'confidence']
    list_filter = ['created_at', 'confidence']
    search_fields = ['speaker_name', 'text', 'meeting__title']
